<?php get_header('mobile');?>
<div class="article-container">
	<?php if(have_posts()): ?>
	<?php while(have_posts()):the_post();  ?>

	<article  class="article">
		<div class="article-header">
			<!-- 文章标题 -->
			<h1><?php the_title_attribute(); ?></h1>
			<!-- 标题下方通栏 -->
			<?php if (ztmao('ztmao_ad_single') != '') { ?>
				<div class="ad-block ad-block-top"><?php echo ztmao('ztmao_mobile_ad_single_url'); ?></div>
			<?php } ?>
			<div class="article-meta">
				<span class="article-time" style="margin-left: 0px;"><?php the_date('Y-m-d H:i'); ?></span>
				
				<?php   $custom_fields = get_post_custom_keys($post->ID);if (!in_array ('laiyuan_value', $custom_fields)) : ?>
				<span class="article-time">来源：<?php bloginfo('name'); ?></span>
				<?php else: ?>
				<?php  $custom = get_post_custom($post->ID);	$custom_value = $custom['laiyuan_value']; ?>
				<span class="article-time">来源： <?php echo get_post_meta($post->ID,"laiyuan_value",true);?></span>
				<?php endif; ?>
					
				<?php edit_post_link('[编辑]'); ?>
				<?php if (ztmao('list-liulan') != '') { ?>
						<span class="article-time liulan"><i class="fa fa-eye" aria-hidden="true"></i> <?php post_views('',''); ?></span>
				<?php } ?>
				<?php  if( !is_category() ) {$category = get_the_category(); if($category[0]){echo '<a class="column-link" href="'.get_category_link($category[0]->term_id ).'" class="article-cate"># '.$category[0]->cat_name.'</a>'; } }; ?>
			</div>			
		</div>

		<!--后台添加文章标题和作者结束 -->
		<!--后台添加文章信息内容开始 -->
		<div class="article-content">
			<?php the_content(); ztmao_link_pages('before=<div id="page">&after=&next_or_number=next&previouspagelink=上一页&nextpagelink=');  ztmao_link_pages('before=&after='); ztmao_link_pages('before=&after=</div>&next_or_number=next&previouspagelink=&nextpagelink=下一页'); ?>
		</div>
		<div class="article-footer">
			<div class="tag-box ">
				<?php //the_tags('', ' ', ''); ?> 
			</div>
		</div>
	</article>
	<div class="ad-block">
		<?php if (ztmao('ztmao_ad_single_article_end') != '') { ?>
			<?php echo ztmao('ztmao_mobile_ad_single_article_end_url'); ?>
		<?php } ?>
	</div>
	<div>
		<!--相关文章 -->
		<?php include( 'parts/related-mobile.php' ); ?>
	</div>
	<?php endwhile; endif;?>
</div>
<!--底部 -->
<div class="go-top0" id="gotopbtn">
	<i class="icon icon-top"></i>
</div>
<?php get_footer('mobile');?>